<script setup lang="ts">
import {useRoute} from "vue-router";
import {useInfoStore} from "@/stores/userInfo.ts";
// 获取路由跳转传递的参数
console.log(useRoute())
let route = useRoute();
// console.log(route.query.id)
// console.log(route.query.key)
console.log(route.params.id)
// console.log(useInfoStore())
let userMsg = useInfoStore()
console.log(userMsg.userInfo.obj)

function getUse() {
  userMsg.changeUserInfo({name:'lisi'})
}
</script>

<template>
  pageB
  <teleport to="#container">
    这是放在container内的内容
  </teleport>
  {{ userMsg.userInfo.obj }}
  <button @click="getUse">getUse</button>
</template>

<style scoped>

</style>
